<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: cv::cnn_3dobj::descriptorExtractor Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d9/d57/namespacecv_1_1cnn__3dobj.html">cnn_3dobj</a></li><li class="navelem"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html">descriptorExtractor</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d3/df0/classcv_1_1cnn__3dobj_1_1descriptorExtractor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::cnn_3dobj::descriptorExtractor Class Reference<div class="ingroups"><a class="el" href="../../d9/d02/group__cnn__3dobj.html">3D object recognition and pose estimation API</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Caffe based 3D images descriptor. A class to extract features from an image. The so obtained descriptors can be used for classification and pose estimation goals <a class="el" href="../../d0/de3/citelist.html#CITEREF_wohlhart15">[274]</a>.  
 <a href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#details">More...</a></p>

<p><code>#include &lt;opencv2/cnn_3dobj.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af873e68d42803decc9a469dd34bcf5c5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#af873e68d42803decc9a469dd34bcf5c5">descriptorExtractor</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;device_type, int device_id=0)</td></tr>
<tr class="memdesc:af873e68d42803decc9a469dd34bcf5c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the device for feature extraction, if the GPU is used, there should be a device_id.  <a href="#af873e68d42803decc9a469dd34bcf5c5">More...</a><br /></td></tr>
<tr class="separator:af873e68d42803decc9a469dd34bcf5c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99358bae501ac83551a2abd0d2a370b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#a99358bae501ac83551a2abd0d2a370b4">extract</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> inputimg, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> feature, <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> feature_blob)</td></tr>
<tr class="memdesc:a99358bae501ac83551a2abd0d2a370b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extract features from a single image or from a vector of images. If loadNet was not called before, this method invocation will fail.  <a href="#a99358bae501ac83551a2abd0d2a370b4">More...</a><br /></td></tr>
<tr class="separator:a99358bae501ac83551a2abd0d2a370b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4a67d1e10135dca839025ded5137f9d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#ac4a67d1e10135dca839025ded5137f9d">getDeviceId</a> ()</td></tr>
<tr class="memdesc:ac4a67d1e10135dca839025ded5137f9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get device ID information for feature extraction.  <a href="#ac4a67d1e10135dca839025ded5137f9d">More...</a><br /></td></tr>
<tr class="separator:ac4a67d1e10135dca839025ded5137f9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1492da1531d545649a17f18b5a45a3e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#ab1492da1531d545649a17f18b5a45a3e">getDeviceType</a> ()</td></tr>
<tr class="memdesc:ab1492da1531d545649a17f18b5a45a3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get device type information for feature extraction.  <a href="#ab1492da1531d545649a17f18b5a45a3e">More...</a><br /></td></tr>
<tr class="separator:ab1492da1531d545649a17f18b5a45a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b758899b6f1f6adfb2c772938943df2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#a2b758899b6f1f6adfb2c772938943df2">loadNet</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;model_file, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;trained_file, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;mean_file=&quot;&quot;)</td></tr>
<tr class="memdesc:a2b758899b6f1f6adfb2c772938943df2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initiate a classification structure, the net work parameter is stored in model_file, the network structure is stored in trained_file, you can decide whether to use mean images or not.  <a href="#a2b758899b6f1f6adfb2c772938943df2">More...</a><br /></td></tr>
<tr class="separator:a2b758899b6f1f6adfb2c772938943df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d2ae7ec2cc9aba124c710de765f0d07"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#a2d2ae7ec2cc9aba124c710de765f0d07">setDeviceId</a> (const int &amp;device_id)</td></tr>
<tr class="memdesc:a2d2ae7ec2cc9aba124c710de765f0d07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set device ID information for feature extraction. Useful to change device without the need to reload the net. Only used for GPU.  <a href="#a2d2ae7ec2cc9aba124c710de765f0d07">More...</a><br /></td></tr>
<tr class="separator:a2d2ae7ec2cc9aba124c710de765f0d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a373a97505c37993ab912130d2b620e96"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d8d/classcv_1_1cnn__3dobj_1_1descriptorExtractor.html#a373a97505c37993ab912130d2b620e96">setDeviceType</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;device_type)</td></tr>
<tr class="memdesc:a373a97505c37993ab912130d2b620e96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set device type information for feature extraction. Useful to change device without the need to reload the net.  <a href="#a373a97505c37993ab912130d2b620e96">More...</a><br /></td></tr>
<tr class="separator:a373a97505c37993ab912130d2b620e96"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Caffe based 3D images descriptor. A class to extract features from an image. The so obtained descriptors can be used for classification and pose estimation goals <a class="el" href="../../d0/de3/citelist.html#CITEREF_wohlhart15">[274]</a>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="af873e68d42803decc9a469dd34bcf5c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af873e68d42803decc9a469dd34bcf5c5">&#9670;&nbsp;</a></span>descriptorExtractor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::cnn_3dobj::descriptorExtractor::descriptorExtractor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;&#160;</td>
          <td class="paramname"><em>device_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>device_id</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the device for feature extraction, if the GPU is used, there should be a device_id. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device_type</td><td>CPU or GPU. </td></tr>
    <tr><td class="paramname">device_id</td><td>ID of GPU. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a99358bae501ac83551a2abd0d2a370b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99358bae501ac83551a2abd0d2a370b4">&#9670;&nbsp;</a></span>extract()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cnn_3dobj::descriptorExtractor::extract </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a>&#160;</td>
          <td class="paramname"><em>inputimg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>feature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&#160;</td>
          <td class="paramname"><em>feature_blob</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Extract features from a single image or from a vector of images. If loadNet was not called before, this method invocation will fail. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputimg</td><td>Input images. </td></tr>
    <tr><td class="paramname">feature</td><td>Output features. </td></tr>
    <tr><td class="paramname">feature_blob</td><td>Layer which the feature is extracted from. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac4a67d1e10135dca839025ded5137f9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4a67d1e10135dca839025ded5137f9d">&#9670;&nbsp;</a></span>getDeviceId()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::cnn_3dobj::descriptorExtractor::getDeviceId </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get device ID information for feature extraction. </p>

</div>
</div>
<a id="ab1492da1531d545649a17f18b5a45a3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1492da1531d545649a17f18b5a45a3e">&#9670;&nbsp;</a></span>getDeviceType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> cv::cnn_3dobj::descriptorExtractor::getDeviceType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get device type information for feature extraction. </p>

</div>
</div>
<a id="a2b758899b6f1f6adfb2c772938943df2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b758899b6f1f6adfb2c772938943df2">&#9670;&nbsp;</a></span>loadNet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cnn_3dobj::descriptorExtractor::loadNet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;&#160;</td>
          <td class="paramname"><em>model_file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;&#160;</td>
          <td class="paramname"><em>trained_file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;&#160;</td>
          <td class="paramname"><em>mean_file</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initiate a classification structure, the net work parameter is stored in model_file, the network structure is stored in trained_file, you can decide whether to use mean images or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">model_file</td><td>Path of caffemodel which including all parameters in CNN. </td></tr>
    <tr><td class="paramname">trained_file</td><td>Path of prototxt which defining the structure of CNN. </td></tr>
    <tr><td class="paramname">mean_file</td><td>Path of mean file(option). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2d2ae7ec2cc9aba124c710de765f0d07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d2ae7ec2cc9aba124c710de765f0d07">&#9670;&nbsp;</a></span>setDeviceId()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cnn_3dobj::descriptorExtractor::setDeviceId </td>
          <td>(</td>
          <td class="paramtype">const int &amp;&#160;</td>
          <td class="paramname"><em>device_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set device ID information for feature extraction. Useful to change device without the need to reload the net. Only used for GPU. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device_id</td><td>ID of GPU. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a373a97505c37993ab912130d2b620e96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a373a97505c37993ab912130d2b620e96">&#9670;&nbsp;</a></span>setDeviceType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cnn_3dobj::descriptorExtractor::setDeviceType </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;&#160;</td>
          <td class="paramname"><em>device_type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set device type information for feature extraction. Useful to change device without the need to reload the net. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device_type</td><td>CPU or GPU. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../de/d45/cnn__3dobj_8hpp.html">cnn_3dobj.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:44 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
